package demo.wint.biz.ao.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import wint.core.service.ServiceContext;
import wint.core.service.initial.ServiceContextAwire;
import wint.lang.magic.MagicMap;
import wint.mvc.form.FormService;
import demo.wint.biz.ao.FirstAO;

public class FirstAOImpl implements FirstAO, ServiceContextAwire {

	private ServiceContext serviceContext;
	
	private static final Logger log = LoggerFactory.getLogger(FirstAOImpl.class);
	
	@Override
	public String sayHello() {
		MagicMap properties =  serviceContext.getConfiguration().getProperties();
		FormService formService = (FormService)serviceContext.getService(FormService.class);
		log.info("properties: " + properties);
		log.info("formService: " + formService);
		return "result hello ";
	}

	@Override
	public void setServiceContext(ServiceContext serviceContext) {
		this.serviceContext = serviceContext;
	}

}
